build: preserve original Cargo.lock for clean
authorLuca Bruno <lucab@debian.org>
Sun, 28 Feb 2016 10:16:05 +0000 (11:16 +0100)
committerLuca Bruno <lucab@debian.org>
Thu, 3 Mar 2016 21:41:28 +0000 (22:41 +0100)
debian/rules

index 3df0f716eb088d385d5516a684853e651f3c9052..402dd0726c27691a3239afcdefbb563cf8f50b41 100755 (executable)
@@ -24,6 +24,7 @@ DEPSDIR := $(CURDIR)/deps
        dh $@ --with bash-completion
 
 override_dh_auto_configure:
+       cp -a $(CURDIR)/Cargo.lock $(CURDIR)/.Cargo.lock.orig
        # Prepare a fake registry by packing all deps
        ./debian/cargo-vendor-pack.py
 
@@ -65,6 +66,7 @@ endif
        mv $(CURDIR)/.deps $(DEPSDIR)
 
 override_dh_auto_clean:
+       -mv $(CURDIR)/.Cargo.lock.orig $(CURDIR)/Cargo.lock
        -mv $(CURDIR)/.deps $(DEPSDIR)
        -$(RM) -r $(CURDIR)/deps/*.rlib \
                        $(CURDIR)/deps/build_script* \